package test.org.jdk.test2.DAO;

/**
 * Created by lcx on 2017/6/2.
 */
public class BookServiceProxy implements BookService {
    private BookService bookService;

    public BookServiceProxy(BookService bookService){
        this.bookService = bookService;
    }

    @Override
    public void buyBook() {
        prepareMoneyForBuyBook();
        bookService.buyBook();
        readBookAfterBuy();
    }

    private void prepareMoneyForBuyBook(){
        System.out.println("为买本准备好钱...");
    }

    private void readBookAfterBuy(){
        System.out.println("终于可以看自己喜欢的书了...");
    }
}
